package com.springframework.context.annotation;

import com.springframework.aop.scope.MyScopedProxyUtils;
import com.springframework.beans.factory.config.MyBeanDefinitionHolder;
import com.springframework.beans.factory.support.MyBeanDefinitionRegistry;
import org.springframework.aop.scope.ScopedProxyUtils;
import org.springframework.beans.factory.config.BeanDefinitionHolder;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;

/**
 * @Author 虎哥
 * @Description //TODO
 * 要带着问题去学习,多猜想多验证
 **/
final class MyScopedProxyCreator {
    private MyScopedProxyCreator() {
    }


    public static MyBeanDefinitionHolder createScopedProxy(
            MyBeanDefinitionHolder definitionHolder, MyBeanDefinitionRegistry registry, boolean proxyTargetClass) {

        return MyScopedProxyUtils.createScopedProxy(definitionHolder, registry, proxyTargetClass);
    }

    public static String getTargetBeanName(String originalBeanName) {
        return ScopedProxyUtils.getTargetBeanName(originalBeanName);
    }
}
